package com.kdd.campus.sh.convert;

import com.kdd.campus.sh.dto.CommentDto;
import com.kdd.campus.sh.po.ShComment;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Auther: fcp
 * @Date: 2020/7/16 07:47
 * @Description:
 */
// 标记为映射接口，并交给spring管理
public interface GeneralConvert<P,D> {


    D poToDto(P po);

    P dtoToPo(D dto);

    List<D> poListToDtoList(List<P> poList);

    List<P> dtoListToPoList(List<D> dtoList);
}
